package com.adroiti.texasholdem.engine.combinations;

import java.util.List;

import com.adroiti.texasholdem.Card;

public class RoyalFlush  extends AbstractCombination{

	private StraightFlush straightFlush;

	public RoyalFlush(){
		this(new StraightFlush());
	}
	
	public RoyalFlush(StraightFlush straightFlush) {
		this.straightFlush = straightFlush;
	}

	@Override
	public int getRank(List<Card> player, List<Card> table) {

		int high = getHighestRank(player, table);
		
		if(high == 14){
			return this.straightFlush.getRank(player, table);
		}
		return 0;
	}

	@Override
	public String getName() {
		return "Royal flush";
	}

	@Override
	public int getCombinationRank() {
		return 10;
	}

}
